package may.test_5_19;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class TestMain {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        Set<Character> set = new HashSet<>();
        for (int i = 0; i < str.length(); i++) {
            set.add(str.charAt(i));
        }
        int n = set.size();
        System.out.println((int)Math.pow(2,n) - 1);
    }
}
